﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="queryUser.aspx.cs" Inherits="admin_queryUser" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
   <link href="../css/body.css" rel="stylesheet" type="text/css" />
    <link href="../css/table.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .main
        {
            margin-left:50px;
            margin-top:30px;
            width: 860px;
            height: 100%;
            background-color: #FFFFFF;
            border: 0;
        }
        .left
        {
            margin-left: 10px;
            margin-top: 20px;
            width: 220px;
            float: left;
            background-color: #ffffff;
        }
        .rigth
        {
            margin-left: 10px;
            margin-top: 30px;
            width: 600px;
            background-color: #ffffff;
            float: left;
        }
    </style>
    <script language="javascript" type="text/javascript">
        function openWin(u, w, h) {
            var l = (screen.width - w) / 2;
            var t = (screen.height - h) / 2;
            var s = 'width=' + w + ', height=' + h + ', top=' + t + ', left=' + l;
            s += ', toolbar=no, scrollbars=no, menubar=no, location=no, resizable=no';
            open(u, 'oWin', s);
        } 
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="main">
        <div class="left">
            编号：<asp:TextBox ID="tb_userID" runat="server" 
                Width="100px"></asp:TextBox>
            <br />
            <hr />
            
            姓名：<asp:TextBox ID="tb_name" runat="server" 
                Width="100px"></asp:TextBox>
            <br />
            <hr />
            邮件：<asp:TextBox ID="tb_email" runat="server" 
                Width="100px"></asp:TextBox>
            <br />
            <hr />
            状态：
            <asp:DropDownList ID="ddl_status" runat="server" Height="20px" Width="143px">
                <asp:ListItem Value="all">全部</asp:ListItem>
                <asp:ListItem Value="0">正常</asp:ListItem>
                <asp:ListItem Value="1">停用</asp:ListItem>
            </asp:DropDownList>
            <br />
            <br />
            <asp:Button ID="btn_search" runat="server" Text="搜索" Width="50px" 
                onclick="btn_search_Click" />
            <br />
        </div>
        <div class="rigth">
            <table align="center" id="Tab" class="tab">
                <tr>
                    <th width="100">
                        编号
                    </th>
                    <th width="110">
                        姓名
                    </th>
                    <th width="100">
                        金币
                    </th>
                    <th width="100">
                        邮件
                    </th>
                    <th width="60">
                        性别
                    </th>
                    <th width="50">状态</th>
                    
                    <th width="50">修改</th>
                </tr>
                <asp:Repeater ID="userList" runat="server">
                    <ItemTemplate>
                        <tr style='background-color: <%#(Container.ItemIndex%2==0)?"#eeeeee":"#ffffff"%>'
                            onmouseover="this.style.background='#ddeeff'" onmouseout="this.style.background='<%#(Container.ItemIndex%2==0)?"#eeeeee":"#ffffff"%>'">
                            <td>
                                <a target="_self" href="javascript:void(openWin('userCourseInfo.aspx?stuId=<%# DataBinder.Eval(Container.DataItem, "userID")%>', 700, 400));">
                                <%# DataBinder.Eval(Container.DataItem, "userID")%></a>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "userName")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "Gold")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "Email")%>
                            </td>
                            <td>
                                <%# DataBinder.Eval(Container.DataItem, "Sex")%>
                            </td>
                            <td>
                            <%# DataBinder.Eval(Container.DataItem, "status").ToString().Equals("0") ? "正常" : "停用"%>
                        </td>
                        <td>
                                <a href="updateUser.aspx?id=<%# DataBinder.Eval(Container.DataItem, "userID")%>" target="_self">
                                    [修改]</a>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
            <div align="center">
            [页次:<asp:Label ID="nowPage" runat="server" Font-Bold="True"></asp:Label>/<asp:Label
                ID="allPages" runat="server" Font-Bold="True" ForeColor="#C00000"></asp:Label>]
            [共<asp:Label ID="allMsg" runat="server" Font-Bold="True"></asp:Label>条
            <asp:Label ID="onePage" runat="server" Font-Bold="True"></asp:Label>条/页] [<asp:HyperLink
                ID="firstPage" runat="server">首页</asp:HyperLink>] [<asp:HyperLink ID="prePage" runat="server">上一页</asp:HyperLink>]
            [<asp:HyperLink ID="nextPage" runat="server">下一页</asp:HyperLink>] [<asp:HyperLink
                ID="endPage" runat="server">尾页</asp:HyperLink>]
        </div>
        </div>
    </div>
    </form>
</body>
</html>
